package com.siecomzg.constconfig;

/**
 * Created on 2015/11/27.
 */
public class ErrorDefine {

    public  static String getErrorDescribe(int errorCode){
        String describe = "";
        switch (errorCode){
            case NO_CALLBACK:
                describe = "没有回调函数";
                break;
            case TIME_OUT:
                describe = "操作超时";
                break;
            case SWIPE_ERROR:
                describe = "刷卡出错，请重试";
                break;
            case RECV_PACKET_ERROR:
                describe = "接受报文出错";
                break;
            case UNKNOW_ERROR:
                describe = "未知错误，请重试";
                break;
            case EMV_INIT_ERR:
                describe = "EMV内核初试失败";
                break;
            case GET_PAN_ERR:
                describe = "获取主账号出错";
                break;
            case SET_TIME_ERR:
                describe = "设置RTC时间出错";
                break;
            case SET_EMVPARAM_ERR:
                describe = "设置EMV参数出错";
                break;
            case FILE_ERR:
                describe = "找不到文件";
                break;
            case STILL_RUN:
                describe = "升级线程仍然运行";
                break;
            case NO_MATCH:
                describe = "指纹不匹配";
                break;
            case THIS_TASK_NO_CANCEL:
                describe = "本任务无法取消";
                break;
            case THIS_TASK_IS_FINISH:
                describe = "此任务已经完成";
                break;
            case KEY_NUMFORMAT_ERR:
                describe = "密码键盘数字格式错误";
                break;
            case INPUT_MAINKEY_ERR:
                describe = "密码键盘下载主密钥错误";
                break;
            case INPUT_WORK_ERR:
                describe = "密码键盘下载工作密钥错误";
                break;
            case SET_KET_ERR:
                describe = "密码键盘设置参数失败";
                break;
            case SET_CARD_NO_ERR:
                describe = "密码键盘设置账号失败";
                break;
            case SET_ENCRYPT_ERR:
                describe = "密码键盘设置加密失败";
                break;
            case KEY_INPUT_ERR:
                describe = "密码键盘输入过程中发生错误，请重试";
                break;
            case KEY_TIME_OUT:
                describe = "密码键盘输入超时";
                break;
            case KEY_SET_ENCRYPT:
                describe = "密码键盘设置加密参数失败";
                break;
            case KEY_RESPOND_ERR:
                describe = "密码键盘响应错误";
                break;
            case INPUT_MAINKEY_TIMEOUT:
                describe = "密码键盘下载主密钥超时";
                break;
            case INPUT_WORK_TIMEOUT:
                describe = "密码键盘下载工作密钥超时";
                break;
            case KEY_ENCRYPT_TIMEOUT:
                describe = "密码键盘设置参数超时";
                break;
            case FINGERPRINT_VER_ERR:
                describe = "读取指纹版本错误";
                break;
            case FINGERPRINT_FREATURE_ERR:
                describe = "读取指纹特征错误";
                break;
            case FINGERPRINT_FREATURE_TIMEOUT:
                describe = "读取指纹特征超时";
                break;
            case FINGERPRINT_TIMEOUT:
                describe = "读取指纹版本超时";
                break;
            case FINGERPRINT_RESPOND_ERR:
                describe = "指纹模块响应错误";
                break;
            case ID_TIMEOUT:
                describe = "读取身份证超时";
                break;
            case ID_CANCEL_READ:
                describe = "取消读取身份证";
                break;
            case ID_RESPOND_ERR:
                describe = "身份证响应失败";
                break;
            case FINAN_TIME_ERR:
                describe = "金融模块超时";
                break;
            case FINAN_RESPOND_ERR:
                describe = "金融模块响应错误";
                break;
            case AUTO_CRAD_TIMEOUT:
                describe = "自动读取卡片超时";
                break;
            case PIC_CRAD_TIMEOUT:
                describe = "读取非接卡片超时";
                break;
            case IC_CRAD_TIMEOUT:
                describe = "读取IC卡片超时";
                break;
            case GET_LOE_ERR:
                describe = "读取交易明细错误";
                break;
            case EMV_CORE_AMT:
                describe = "交易授权金额错误";
                break;
            case EMV_CREATE_APP_ERR:
                describe = "交易APP创建失败";
                break;
            case QPBOC_PROCESS_ERR:
                describe = "QPBOC交易失败";
                break;
            case SELECT_APP_ERR:
                describe = "选择APP交易失败";
                break;
            case GET_TAGS_ERR:
                describe = "获取TAG失败";
                break;
            case MSR_CARD_TIME:
                describe = "刷卡超时";
                break;
            case PICC_OPEN_ERR:
                describe = "非接模块打开失败";
                break;
            case MSR_OPEN_ERR:
                describe = "磁条模块打开失败";
                break;
            case ARPC_ERR:
                describe = "ARPC失败";
                break;
            case GET_SCRIPT_ERR:
                describe = "获取脚本执行结果失败";
                break;
            case PBOC_COMPLETE:
                describe = "PBOC执行失败";
                break;
            case CARD_TYPE_ERR:
                describe = "卡类型错误";
                break;
            case ARPC_TIMEOUT:
                describe = "ARPC超时";
                break;
            case IC_LOG_TIMEOUT:
                describe = "读取IC交易明细超时";
                break;
            case PIC_LOG_TIMEOUT:
                describe = "读取非接交易明细超时";
                break;
            case SIGNATURE_TIMEOUT:
                describe = "签名超时";
                break;
            case PBOC_BEFORE_ERR:
                describe = "PBOC预处理错误";
                break;
            case PBOC_CLBEFORE_ERR:
                describe = "PBOCCL预处理错误";
                break;
            case CANCEL_INPUT:
                describe = "密码键盘取消输入";
                break;
            case LENGTH_ERR:
                describe = "密码键盘长度错误";
                break;
            case NO_FILE:
                describe = "没有文件";
                break;
            case RESET_MODULE:
                describe = "模块错误重置中";
                break;
            case SIGNATURE_INIT_FAIL:
                describe = "签名加密初始化失败";
                break;
            case SIGNATURE_SM2_FAIL:
                describe = "签名生成SM2失败";
                break;
            case SIGNATURE_SM4_FAIL:
                describe = "签名注入SM4密钥失败";
                break;
            case SIGNATURE_EN_FAIL:
                describe = "签名获取加密数据失败";
                break;
            case CALC_MAC_ERROR:
                describe = "MAC计算错误";
                break;
            case FINGERPRINT_ENROLL:
                describe = "指纹生成模板错误";
                break;
            case  FINGERPRINT_MATCH_ERR:
                describe = "指纹比对错误";
                break;

            case  FINGERPRINT_CANCEL:
                describe = "指纹读取已取消";
                break;
            case  FINGERPRINT_IMAGE_ERROR:
                describe = "指纹图像读取错误";
                break;

            case KEYBORAD_CHECK_ERR:
                describe = "检查密钥错误";
                break;
            case KEY_WEAK_ERR:
                describe = "密码过于简单";
                break;
            case KEY_NO_WORK_KEY:
                describe = "请先下载工作密钥";
                break;
            case KEY_NO_MAIN_KEY:
                describe = "请先下载主密钥";
                break;
            case PWD_LENGTH_ERR:
                describe = "密码长度参数错误";
                break;


            default:
                describe = "未定义错误";
                break;
        }

        return describe;
    }
    public final static int NO_CALLBACK = -10001;

    public final static int TIME_OUT = -10002;
    public final static int SWIPE_ERROR = -10003;
    public final static int RECV_PACKET_ERROR = -12509;
    public final static int UNKNOW_ERROR = -12510;

    public final static int EMV_INIT_ERR = -10006;
    public final static int GET_PAN_ERR = -10007;
    public final static int SET_TIME_ERR = -10009;
    public final static int SET_EMVPARAM_ERR = -10010;
    public final static int FILE_ERR = -10012;
    public final static int STILL_RUN = -10013;

    public final static int NO_MATCH = -10014;



    public final static int THIS_TASK_NO_CANCEL = -10025;
    public final static int THIS_TASK_IS_FINISH = -10026;
    public final static int NO_FILE = -12511;
    public final static int FILE_ERROR = -12512;
    /**
     * keyBoard
     */

    public final static int KEY_NUMFORMAT_ERR = -40001;
    public final static int INPUT_MAINKEY_ERR = -40002;
    public final static int INPUT_WORK_ERR = -40003;
    public final static int SET_KET_ERR = -40004;
    public final static int SET_CARD_NO_ERR = -40005;
    public final static int SET_ENCRYPT_ERR = -40006;
    public final static int KEY_INPUT_ERR = -40007;
    public final static int KEY_TIME_OUT = -40008;
    public final static int KEY_SET_ENCRYPT = -40009;
    public final static int KEY_RESPOND_ERR = -40010;
    public final static int CANCEL_INPUT = -40011;
    public final static int LENGTH_ERR = -40012;
    public final static int INPUT_MAINKEY_TIMEOUT = -40013;
    public final static int INPUT_WORK_TIMEOUT = -40014;
    public final static int KEY_ENCRYPT_TIMEOUT = -40015;
    public final static int CALC_MAC_ERROR = -40016;
    public final static int  KEYBORAD_OPEN_ERR = -40017;
    public final static int  KEYBORAD_CHECK_ERR = -40018;
    public final static int  KEY_WEAK_ERR = -40019;
    public final static int KEY_NO_WORK_KEY = -40020; //没有下载工作密钥
    public final static int KEY_NO_MAIN_KEY = -40021; //没有下载主密钥
    public final static int KEY_INPUT_CANCEL = -40022; //没有下载主密钥
    public final static int PWD_LENGTH_ERR = -40023; // 密码长度参数错误
    /**
     * fingerprint
     */
    public final static int FINGERPRINT_VER_ERR = -30025;
    public final static int FINGERPRINT_FREATURE_ERR = -30026;
    public final static int FINGERPRINT_FREATURE_TIMEOUT = -30031;
    public final static int FINGERPRINT_TIMEOUT = -30032;
    public final static int FINGERPRINT_RESPOND_ERR = -30033;
    public final static int FINGERPRINT_NO_HAVE = -30034;
    public final static int FINGERPRINT_ENROLL = -30035;
    public final static int FINGERPRINT_MATCH_ERR = -30036;
    public final static int FINGERPRINT_CANCEL = -30037;
    public final static int FINGERPRINT_IMAGE_ERROR = -30038;
    /**
     * ID
     */
    public final static int ID_TIMEOUT = -50027;
    public final static int ID_RESPOND_ERR = -50028;
    public final static int ID_CANCEL_READ = -50029;

    /**
     * finan 金融
     */
    public final static int FINAN_TIME_ERR = -20029;
    public final static int FINAN_RESPOND_ERR = -20030;
    public final static int AUTO_CRAD_TIMEOUT = -20032;
    public final static int PIC_CRAD_TIMEOUT = -20033;
    public final static int IC_CRAD_TIMEOUT = -20034;
    public final static int GET_LOE_ERR = -20035;
    public final static int EMV_CORE_AMT = -20036;
    public final static int EMV_CREATE_APP_ERR = -20037;
    public final static int QPBOC_PROCESS_ERR = -20038;
    public final static int SELECT_APP_ERR = -20039;
    public final static int PBOC_BEFORE_ERR = -20028;
    public final static int PBOC_CLBEFORE_ERR = -20040;
    public final static int GET_TAGS_ERR = -20041;
    public final static int MSR_CARD_TIME = -20042;
    public final static int PICC_OPEN_ERR = -20043;
    public final static int MSR_OPEN_ERR = -20044;
    public final static int ARPC_ERR = -20045;
    public final static int GET_SCRIPT_ERR = -20046;
    public final static int PBOC_COMPLETE = -20047;
    public final static int CARD_TYPE_ERR = -20048;
    public final static int ARPC_TIMEOUT = -20049;
    public final static int IC_LOG_TIMEOUT = -20050;
    public final static int PIC_LOG_TIMEOUT = -20051;
    public final static int RESET_MODULE = -20052;
    public final static int FINAN_OPERATE_CANCEL = -20053; //取消读卡操作

    /**
     * 签名板
     */
    public final static int SIGNATURE_TIMEOUT = -60001;

    public final static int SIGNATURE_INIT_FAIL = -60002;

    public final static int SIGNATURE_SM2_FAIL = -60003;
    public final static int SIGNATURE_SM4_FAIL = -60004;

    public final static int SIGNATURE_EN_FAIL = -60005;
    public final static int SIGNATURE_USER_CANCEL = -60006; //用户取消了签名
    public final static int SIGNATURE_ADMIN_CANCEL = -60007; //客户经理取消了签名
}
